package org.frog.sgs.card.basic.type;

/**
 * 花色
 * 
 * @author duanxiangqi
 * @date 2012-10-14
 */
public enum Suit {
	/**
	 * 黑桃
	 */
	spades(1),
	/**
	 * 红桃
	 */
	hearts(2),
	/**
	 * 草花
	 */
	club(3),
	/**
	 * 方块
	 */
	diamond(4);

	public static Suit get(int type) {
		for (Suit suit : Suit.values()) {
			if (suit.getValue() == type) {
				return suit;
			}
		}
		return null;
	}

	private int value;

	Suit(int value) {
		this.value = value;
	}

	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}
}
